import pyautogui
import time

pyautogui.FAILSAFE=False

# 获取屏幕大小
screen_width, screen_height = pyautogui.size()

# 将鼠标移动到屏幕右下角
pyautogui.moveTo(screen_width, screen_height, duration=1)

# 等待1秒
time.sleep(1)

# 在屏幕中心点击鼠标左键
pyautogui.click(screen_width / 2, screen_height / 2, duration=0.5)

# 等待1秒
time.sleep(1)

# 右键点击
pyautogui.click(button='right')

# 等待1秒
time.sleep(1)

# 在屏幕左上角点击鼠标左键
pyautogui.click(0, 0, duration=0.5)

# 等待1秒
time.sleep(1)

# 连续点击
pyautogui.click(screen_width / 2, screen_height / 2, clicks=3, interval=0.1, duration=0.5)

# 等待1秒
time.sleep(1)

# 拖动鼠标到屏幕右上角
pyautogui.dragTo(screen_width, 0, duration=0.5)

# 等待1秒
time.sleep(1)

# 鼠标滚轮滚动
pyautogui.scroll(2)

# 等待1秒
time.sleep(1)

# 拖动鼠标到屏幕中心
pyautogui.dragTo(screen_width / 2, screen_height / 2, duration=0.5)

# 等待1秒
time.sleep(1)

# 拖动鼠标到屏幕右下角
pyautogui.dragTo(screen_width, screen_height, duration=0.5)

# 等待1秒
time.sleep(1)

# 拖动鼠标到屏幕左下角
pyautogui.dragTo(0, screen_height, duration=0.5)

# 等待1秒
time.sleep(1)

# 退出程序
print("Demo 执行完毕！")
